import request from '@/utils/request'

export function getEmployeeInfo(id) {
  return request({
    url: '/employee',
    method: 'get',
    params: {
      id
    }
  })
}

export function getEmployeeList(params) {
  return request({
    url: '/employee',
    method: 'get',
    params
  })
}

export function modifyEmployeeInfo(id, payload) {
  return request({
    url: '/employee',
    method: 'put',
    params: {
      id
    },
    data: payload
  })
}

export function addEmployee(data) {
  return request({
    url: '/employee',
    method: 'post',
    data
  })
}

export function delEmployee(id, payload) {
  return request({
    url: '/employee',
    method: 'put',
    params: {
      id
    },
    data: payload
  })
}
